import React, { useContext } from "react";
import { AppContext } from "@/App";

export default function Footer() {
  const { setCount } = useContext(AppContext);
  //事件函数

  return (
    <div className="box">
      <h2>Footer</h2>
      <button
        onClick={() => {
          setCount((x) => x + 1);
        }}
      >
        修改count
      </button>
    </div>
  );
}
